Skip to content

fix(v0.1.2): tool casing, project picker, sessions, control locking#70

Merged
oratis merged 1 commit into
mainfrom
fix/p1-rest
May 28, 2026
Merged

fix(v0.1.2): tool casing, project picker, sessions, control locking#70
oratis merged 1 commit into
mainfrom
fix/p1-rest

Conversation

@oratis

@oratis oratis commented May 28, 2026

Copy link
Copy Markdown
Owner

Comprehensive fix pass triggered by the 0.1.1 playtest. Resolves every issue called out in the user's screenshot.

Issues fixed

  1. tool_write "missing required key filePath" — LLM occasionally emits camelCase keys when the schema says snake_case. All 6 Mac tool wrappers now accept either via tolerant pickStr/pickNum/pickBool. System prompt also reminds the LLM the schemas are snake_case.

  2. Sessions didn't appear in the sidebar — mac-agent didn't persist anything. Added Tauri commands session_create / session_append writing JSONL to ~/.deepcode/sessions/. Sidebar refreshes via a sessionEpoch counter when each turn ends.

  3. Inspector rail completely unclickable — All 6 buttons now route to their respective screens. Active screen highlights.

  4. Controls switchable mid-turncontrolsLocked = busy || pendingApproval now drives disabled on mode/model/effort dropdowns.

  5. No project folder picker — Added ProjectPickerOverlay. Persists choice to settings.json. Threads cwd through agent.start → runAgent. Sidebar shows project chip + switch button.

  6. Mode/model/effort UX was basic — New Dropdown component with click-popover, inline descriptions, meta annotations. 5 official modes surfaced (was 3 cycling).

Additional improvements

  • ReplScreen carries projectPath into the system prompt so the LLM knows where it's operating
  • 'chat' route folded into 'repl' (the new shell has one chat surface); bundle drops from 673 KB → 345 KB
  • Sidebar shows abbreviated project path with home → ~

Versioning

  • Bumped to 0.1.2 across tauri.conf.json, Cargo.toml, both package.jsons
  • CHANGELOG entry under [0.1.2]

Test plan

  • pnpm typecheck clean (7 workspaces)
  • pnpm test — 533+ tests pass
  • pnpm --filter @deepcode/desktop build succeeds
  • User: install 0.1.2 DMG → About shows v0.1.2 → conversation works → DeepSeek writes a real file under the picked folder → new session appears in sidebar
  • User: try clicking each inspector rail button → screen switches correctly

🤖 Generated with Claude Code

…cking

Audits and fixes from the 0.1.1 playtest screenshot:

**Tool input field-name fix.** tool_write was failing with
"missing required key filePath" because DeepSeek occasionally emits
snake_case schema fields with camelCase keys in tool_use calls.
All 6 Mac tool wrappers (Read/Write/Edit/Bash/Glob/Grep) now accept
either case via a tolerant pickStr/pickNum/pickBool helper.

**Project folder picker.** Before chat is usable, users now pick a
project folder via the native file dialog. The path persists to
~/.deepcode/settings.json#projectPath and is threaded as `cwd` into
every agent turn (was hard-coded `/`). Sidebar shows the active
project + a ⇄ switch button to re-open the picker.

**Session persistence.** Added Tauri commands session_create +
session_append. mac-agent now creates a JSONL on first turn (id like
2026-05-28-<8hex>) and appends user + assistant messages. Sidebar
refreshes via a sessionEpoch counter on turn_done, so freshly-started
conversations appear in the Today bucket.

**Mid-turn controls locked.** New controlsLocked flag computed from
busy + pendingApproval; mode / model / effort dropdowns all respect it.
Was previously freely switchable mid-turn, which contradicted whatever
the agent loop already had baked in.

**Inspector rail wired.** All 6 rail icons now route to their
respective screens (Plan→Permissions, Sessions, Plugins, Skills, MCP,
About, Settings, cog→Settings). Expand-chevron ‹ still deferred.

**Proper dropdowns** for mode / model / effort — new Dropdown
component renders a click-popover with inline descriptions + meta,
replacing brittle click-to-cycle UX. 5 official modes now surfaced
(default / acceptEdits / plan / dontAsk / bypassPermissions).

**ChatScreen** folded into ReplScreen — the legacy split chat/terminal
view isn't on the new shell. Kept as a stub for symmetry. Bundle
dropped from 673 KB → 345 KB as a side effect (xterm out of the path).

**System prompt** now informs the LLM of the working directory + that
tool schemas are snake_case, so it stops guessing key casings.

Version bumped to 0.1.2 across tauri.conf / both package.jsons / Cargo.
CHANGELOG entry added. All typecheck + 533 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit ecc91f3 into main May 28, 2026
1 of 3 checks passed
@oratis oratis deleted the fix/p1-rest branch May 28, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant